package com.oceansoft.mobile.econsole.modules.sys.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.oceansoft.mobile.econsole.common.util.web.PageUtil;
import com.oceansoft.mobile.econsole.modules.base.entity.Pager;
import com.oceansoft.mobile.econsole.modules.base.entity.Query;
import com.oceansoft.mobile.econsole.modules.message.entity.PushMessage;
import com.oceansoft.mobile.econsole.modules.message.persistence.IMessageMapper;
import com.oceansoft.mobile.econsole.modules.sys.persistence.IRecordMapper;
import com.oceansoft.mobile.econsole.modules.sys.service.IRecordInfoService;
@Service
public class RecordInfoServiceImpl implements IRecordInfoService {
	 @Resource
	    private IRecordMapper recordMapper;
	@Override
	public Pager findByPage(Query query) {
		  
		        PageHelper.startPage(query.getPageNum(), query.getNumPerPage(), true);
		        Page<PushMessage> page = (Page<PushMessage>) recordMapper.loadPageByCondition(query);
		        return PageUtil.page2pager(page, query);
	}

}
